<!-- eslint-disable vue/multi-word-component-names -->
<!-- eslint-disable vue/no-mutating-props -->
<template>
    <div style="width: inherit;">
        <div @click="show = !show" class="fold">
            <el-icon v-if="show">
                <CaretBottom />
            </el-icon>
            <el-icon v-else>
                <CaretRight />
            </el-icon>
            {{ title }}
            {{ size }}
        </div>
        <div v-show="show" class="slot">
            <slot></slot>
        </div>
    </div>
</template>

<script setup>
const { show, title, size } = defineProps(['show', 'title', 'size'])

</script>

<style scoped>
.fold {
    margin: 10px 0;
    cursor: pointer;
    user-select: none;
    font-size: v-bind('size || "12px"');
}

.slot {
    padding-left: 18px;
}
</style>